package com.hotel.service.impl;

import com.hotel.model.auto.Room;
import com.hotel.mapper.auto.RoomMapper;
import com.hotel.model.auto.RoomClass;
import com.hotel.service.IRoomService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author
 * @since 2023-04-03
 */
@Service
public class RoomServiceImpl extends ServiceImpl<RoomMapper, Room> implements IRoomService {

    @Autowired(required = false)
    private RoomMapper roomMapper;

    @Override
    public List<RoomClass> findAllRoom() {
        return roomMapper.findAllRoom();
    }

    @Override
    public int PayRoomId(int room_type_id) {
        return roomMapper.PayRoomId(room_type_id);
    }

    @Override
    public int PayUpF(int roomId) {
        return roomMapper.PayUpF(roomId);
    }

    @Override
    public int PayUpE(int roomId) {
        return roomMapper.PayUpE(roomId);
    }
}
